package com.zhuxiang.test2;

/**
 * 定义手机卡类
 */
public class PhoneCard {
    //卡类型
    private String type;
    //卡号
    private String num;
    //用户名
    private String uname;
    //密码
    private String pwd;
    //账号余额
    private int balance;
    //通话时长
    private int callLenth;
    //上网流量
    private int flow;

    public PhoneCard(String type, String num, String uname, String pwd, int balance, int callLenth, int flow) {
        this.type = type;
        this.num = num;
        this.uname = uname;
        this.pwd = pwd;
        this.balance = balance;
        this.callLenth = callLenth;
        this.flow = flow;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getNum() {
        return num;
    }

    public void setNum(String num) {
        this.num = num;
    }

    public String getUname() {
        return uname;
    }

    public void setUname(String uname) {
        this.uname = uname;
    }

    public String getPwd() {
        return pwd;
    }

    public void setPwd(String pwd) {
        this.pwd = pwd;
    }

    public int getBalance() {
        return balance;
    }

    public void setBalance(int balance) {
        this.balance = balance;
    }

    public int getCallLenth() {
        return callLenth;
    }

    public void setCallLenth(int callLenth) {
        this.callLenth = callLenth;
    }

    public int getFlow() {
        return flow;
    }

    public void setFlow(int flow) {
        this.flow = flow;
    }

    /**
     * 定义显示方法显示（卡号 + 用户名 + 当前余额）
     */
    public void show(){
        System.out.println("卡号："+getNum()+"，用户名："+getUname()+",当前余额："+getBalance()+"元");
    }
}
